package com.sojson.util.xlwb;

import com.sojson.base.impl.BaseUtilDto;
import com.sojson.config.exception.bean.Status;

/**
 * WxBean对象
 * 
 * @author liu
 * @date 2020-09-03
 */
public class XlwbBean extends BaseUtilDto {

    /***/
    private static final long serialVersionUID = 2231406852564862492L;

    /** appId类似帐号 */
    private String appId;
    /** 网页授权接口调用凭证,注意：此access_token与基础支持的access_token不同 */
    private String accessToken;
    /**
     * 授权用户的UID，本字段只是为了方便开发者，减少一次user/show接口调用而返回的
     * 第三方应用不能用此字段作为用户登录状态的识别，只有access_token才是用户授权的唯一票据
     */
    private String uid;
    /** access_token接口调用凭证超时时间，单位（秒） */
    private Integer expiresIn;
    /** 页面路径 */
    private String url;
    /** 状态信息 */
    private Status status;

    public XlwbBean() {}

    /**
     * 成功返回
     * @param code
     */
    public XlwbBean(Integer code) {
        this(code, null);
    }

    /**
     * 返回失败
     * @param code
     * @param msg
     */
    public XlwbBean(Integer code, String msg) {
        this(new Status(code, msg));
    }

    public XlwbBean(Status status) {
        this.status = status;
    }

    public XlwbBean(String accessToken, String uid) {
        this.accessToken = accessToken;
        this.uid = uid;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public Integer getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(Integer expiresIn) {
        this.expiresIn = expiresIn;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

}